//标注位置
var geoCoordMap ={
							
							"揭阳": [116.09,23.68],"江门": [112.59,22.18],
							"云浮": [111.69,23.12],"广州": [113.55,23.89],"阳江": [111.79,22.00],
							"清远": [112.54,24.69],"中山": [113.29,22.78],"惠州": [114.49,23.58],
							"深圳": [114.49,22.58],"茂名": [110.84,22.29],"珠海": [114.19,22.08],
							"汕尾": [115.49,23.22],"湛江": [110.29,21.38],"梅州": [116.19,24.48],
							"韶关": [113.59,25.12],"佛山": [112.95,23.28],"东莞": [113.94,23.25],
							"潮州": [116.89,24.18],"河源": [114.89,24.18],"汕头": [117.09,23.42],
							"肇庆": [112.19,23.82]};

//标注数据处理							
 function convertData(data) {
   
   return res;
};




function map(map){
		//加载地图json数据
		echarts.registerMap('guangdong', guangdong);
		
		var myChart=echarts.init(document.getElementById(map.id),map.theme); 
		
		var res = [];
		for (var i = 0; i < map.data.length; i++) {
		   var geoCoord = geoCoordMap[map.data[i].name];
		   if (geoCoord) {
			   res.push({
				   name: map.data[i].name,
				   value: geoCoord,
				   symbol:map.data[i].value>map.warn.val?map.warn.symbol1:map.warn.symbol2,
				   val:map.data[i].value
			   });
		   }
		}

option = {
	title: {
        text: map.title
    },
    tooltip: {},
    geo: {
        map: 'guangdong',
        roam: true,
        label: {
            normal: {
                show: false,
                textStyle: {
                    color: 'rgba(0,0,0,0.4)',
                }
            },
			emphasis:{
				show:false
			}
        },
        itemStyle: {
            normal:{
                borderColor: 'rgba(0, 0, 0, 0.2)',
				color:map.itemStyle_color
            },
            emphasis:{
                /*areaColor: null,
                shadowOffsetX: 0,
                shadowOffsetY: 0,
                shadowBlur: 20,
                borderWidth: 0,
                shadowColor: 'rgba(0, 0, 0, 0.5)',*/
				areaColor: '#7c0e26',
            }
        }
    },
    series : [
       {
           type: 'scatter',
           coordinateSystem: 'geo',
           data: res,
           symbolSize: 20,
		   tooltip: {show: false},
           label: {
               normal: {
                   formatter: function(params){ return params.data.name+'\n'+params.data.val;},
                   position: 'inside',
				   color:'#fff',
				   fontSize: 12,
                   show: true
               },
               emphasis: {
                   show: true
               }
           }
        },
        {
            name: 'categoryA',
            type: 'map',
            geoIndex: 0,
            tooltip: {show: false},
            data:[
                
            ]
        }
    ]
};

myChart.setOption(option);
			var ecConfig = echarts.config;
}